Skip to content

Conversation

mosche
Copy link
Contributor

@mosche mosche commented Sep 15, 2025

Silence time zone ID deprecation warning for JDK 25 due to log4j2 bug.

On JDK 25 log4j2 2.19 is triggering deprecation warnings due to the initialization of FastDateParser accessing deprecated time zones when iterating over all known time zone IDs. FastDateParser wasn't even used and got removed entirely in log4j 2.22.0.

Relates to #132035
Relates to ES-12649

@mosche mosche requested a review from a team as a code owner September 15, 2025 12:25
@mosche mosche added >non-issue :Core/Infra/Core Core issues without another label labels Sep 15, 2025
@elasticsearchmachine elasticsearchmachine added v9.2.0 Team:Core/Infra Meta label for core/infra team labels Sep 15, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

private static Set<String> filter = Set.of("WARNING: Using incubator modules: jdk.incubator.vector");

private static boolean isFilteredOut(String line) {
if (filter.contains(line)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making the filter a predicate? then we can still have one set of filters, instead of some in the set and some in here manually

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjernst how about just using the Regex util? Or do you have concerns using something that eventually depends on Lucene? Alternatively the simple predicate below?

  /** Messages / lines predicate to filter from the output. */
  private static Predicate<String> filter = line -> {
      return "WARNING: Using incubator modules: jdk.incubator.vector".equals(line)
          || (line.startsWith("WARNING: Use of the three-letter time zone ID")
              && line.endsWith("is deprecated and it will be removed in a future release"));
  };

@mosche mosche added auto-backport Automatically create backport pull requests when merged v8.19.5 v9.1.5 v9.0.8 v8.18.9 labels Sep 17, 2025
@mosche
Copy link
Contributor Author

mosche commented Sep 18, 2025

kind ping @rjernst, could you review again

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19
9.1
9.0
8.18

mosche added a commit to mosche/elasticsearch that referenced this pull request Sep 18, 2025
mosche added a commit to mosche/elasticsearch that referenced this pull request Sep 18, 2025
mosche added a commit to mosche/elasticsearch that referenced this pull request Sep 18, 2025
elasticsearchmachine pushed a commit that referenced this pull request Sep 18, 2025
szybia added a commit to szybia/elasticsearch that referenced this pull request Sep 18, 2025
* upstream/main: (43 commits)
  Unmute testAckedIndexing to see if it still fails on main (elastic#134682)
  Silence time zone ID deprecation warning for JDK 25 due to log4j2 bug. (elastic#134719)
  Adding a getUnmodifiableSourceAndMetadata() method to IngestDocument (elastic#134816)
  Mark the create-index-from-source action as publicly available on Serverless (elastic#134953)
  ESQL: Rename command from INLINESTATS to INLINE STATS (elastic#134827)
  Document multi index query support for simplified retrievers (elastic#134980)
  [ML] Fix YAMl test to use correct query parameter type (elastic#134999)
  [Transform] Wait for PIT to close (elastic#134955)
  Add XPath to XmlUtils (elastic#134923)
  Fixing conditional processor mutability bugs (elastic#134936)
  [Transform] Lower loglevel of 3 transform-related error messages from ERROR to WARN (elastic#134985)
  Unmute pattern text tests. (elastic#134981)
  Integrate weights into simplified RRF retriever syntax (elastic#132680)
  Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:stats.CountDistinctWithConditions} elastic#134993
  Update periodic java-ea build to test java 26 pre-release (elastic#134983)
  Mute org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT test {csv-spec:stats.CountDistinctWithConditions} elastic#134984
  Fix and unmute testIndexSettingProviderPrivateSetting (elastic#134861)
  Add missing common cat params (elastic#134870)
  Support querying multiple indices with the simplified RRF retriever (elastic#134822)
  Allow including semantic field embeddings in _source (elastic#134717)
  ...
elasticsearchmachine pushed a commit that referenced this pull request Sep 18, 2025
elasticsearchmachine pushed a commit that referenced this pull request Sep 18, 2025
elasticsearchmachine pushed a commit that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v8.18.8 v8.19.5 v9.0.8 v9.1.5 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants